<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gimppalette: GIMP 3 Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GIMP 3 Library Reference Manual">
<link rel="up" href="libgimp-data.html" title="Data Objects">
<link rel="prev" href="libgimp3-gimpgradients.html" title="gimpgradients">
<link rel="next" href="libgimp3-gimppalettes.html" title="gimppalettes">
<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libgimp3-gimppalette.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="libgimp-data.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libgimp3-gimpgradients.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgimp3-gimppalettes.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgimp3-gimppalette"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgimp3-gimppalette.top_of_page"></a>gimppalette</span></h2>
<p>gimppalette — Functions operating on a single palette.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgimp3-gimppalette.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-new" title="gimp_palette_new ()">gimp_palette_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-duplicate" title="gimp_palette_duplicate ()">gimp_palette_duplicate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-rename" title="gimp_palette_rename ()">gimp_palette_rename</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-delete" title="gimp_palette_delete ()">gimp_palette_delete</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-get-info" title="gimp_palette_get_info ()">gimp_palette_get_info</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../html/libgimpcolor3-GimpRGB.html#GimpRGB"><span class="returnvalue">GimpRGB</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-get-colors" title="gimp_palette_get_colors ()">gimp_palette_get_colors</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-get-columns" title="gimp_palette_get_columns ()">gimp_palette_get_columns</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-set-columns" title="gimp_palette_set_columns ()">gimp_palette_set_columns</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-add-entry" title="gimp_palette_add_entry ()">gimp_palette_add_entry</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-delete-entry" title="gimp_palette_delete_entry ()">gimp_palette_delete_entry</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-entry-get-color" title="gimp_palette_entry_get_color ()">gimp_palette_entry_get_color</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-entry-set-color" title="gimp_palette_entry_set_color ()">gimp_palette_entry_set_color</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-entry-get-name" title="gimp_palette_entry_get_name ()">gimp_palette_entry_get_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-entry-set-name" title="gimp_palette_entry_set_name ()">gimp_palette_entry_set_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimp3-gimppalette.html#gimp-palette-is-editable" title="gimp_palette_is_editable ()">gimp_palette_is_editable</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgimp3-gimppalette.description"></a><h2>Description</h2>
<p>Functions operating on a single palette.</p>
</div>
<div class="refsect1">
<a name="libgimp3-gimppalette.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gimp-palette-new"></a><h3>gimp_palette_new ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_palette_new (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>Creates a new palette</p>
<p>This procedure creates a new, uninitialized palette</p>
<div class="refsect3">
<a name="gimp-palette-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The requested name of the new palette.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-new.returns"></a><h4>Returns</h4>
<p>The actual new palette name.
The returned value must be freed with <code class="function">g_free()</code>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-duplicate"></a><h3>gimp_palette_duplicate ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_palette_duplicate (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>Duplicates a palette</p>
<p>This procedure creates an identical palette by a different name</p>
<div class="refsect3">
<a name="gimp-palette-duplicate.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-duplicate.returns"></a><h4>Returns</h4>
<p>The name of the palette's copy.
The returned value must be freed with <code class="function">g_free()</code>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-rename"></a><h3>gimp_palette_rename ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_palette_rename (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
                     <em class="parameter"><code>const <span class="type">gchar</span> *new_name</code></em>);</pre>
<p>Rename a palette</p>
<p>This procedure renames a palette</p>
<div class="refsect3">
<a name="gimp-palette-rename.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>new_name</p></td>
<td class="parameter_description"><p>The new name of the palette.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-rename.returns"></a><h4>Returns</h4>
<p>The actual new name of the palette.
The returned value must be freed with <code class="function">g_free()</code>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-delete"></a><h3>gimp_palette_delete ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_palette_delete (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>Deletes a palette</p>
<p>This procedure deletes a palette</p>
<div class="refsect3">
<a name="gimp-palette-delete.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-delete.returns"></a><h4>Returns</h4>
<p> TRUE on success.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-get-info"></a><h3>gimp_palette_get_info ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_palette_get_info (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
                       <em class="parameter"><code><span class="type">gint</span> *num_colors</code></em>);</pre>
<p>Retrieve information about the specified palette.</p>
<p>This procedure retrieves information about the specified palette.
This includes the name, and the number of colors.</p>
<div class="refsect3">
<a name="gimp-palette-get-info.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>num_colors</p></td>
<td class="parameter_description"><p>The number of colors in the palette. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-get-info.returns"></a><h4>Returns</h4>
<p> TRUE on success.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-get-colors"></a><h3>gimp_palette_get_colors ()</h3>
<pre class="programlisting"><a href="../html/libgimpcolor3-GimpRGB.html#GimpRGB"><span class="returnvalue">GimpRGB</span></a> *
gimp_palette_get_colors (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
                         <em class="parameter"><code><span class="type">gint</span> *num_colors</code></em>);</pre>
<p>Gets all colors from the specified palette.</p>
<p>This procedure retrieves all color entries of the specified palette.</p>
<div class="refsect3">
<a name="gimp-palette-get-colors.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>num_colors</p></td>
<td class="parameter_description"><p>Length of the colors array. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-get-colors.returns"></a><h4>Returns</h4>
<p>The colors in the palette.
The returned value must be freed with <code class="function">g_free()</code>. </p>
<p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=num_colors][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GimpRGB][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-6.html#api-index-2.6">2.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-get-columns"></a><h3>gimp_palette_get_columns ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gimp_palette_get_columns (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>Retrieves the number of columns to use to display this palette</p>
<p>This procedures retrieves the preferred number of columns to use
when the palette is being displayed.</p>
<div class="refsect3">
<a name="gimp-palette-get-columns.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-get-columns.returns"></a><h4>Returns</h4>
<p> The number of columns used to display this palette.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-set-columns"></a><h3>gimp_palette_set_columns ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_palette_set_columns (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
                          <em class="parameter"><code><span class="type">gint</span> columns</code></em>);</pre>
<p>Sets the number of columns to use when displaying the palette</p>
<p>This procedures controls how many colors are shown per row when the
palette is being displayed. This value can only be changed if the
palette is writable. The maximum allowed value is 64.</p>
<div class="refsect3">
<a name="gimp-palette-set-columns.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>columns</p></td>
<td class="parameter_description"><p>The new number of columns.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-set-columns.returns"></a><h4>Returns</h4>
<p> TRUE on success.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-add-entry"></a><h3>gimp_palette_add_entry ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_palette_add_entry (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
                        <em class="parameter"><code>const <span class="type">gchar</span> *entry_name</code></em>,
                        <em class="parameter"><code>const <a href="../html/libgimpcolor3-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>,
                        <em class="parameter"><code><span class="type">gint</span> *entry_num</code></em>);</pre>
<p>Adds a palette entry to the specified palette.</p>
<p>This procedure adds an entry to the specified palette. It returns an
error if the entry palette does not exist.</p>
<div class="refsect3">
<a name="gimp-palette-add-entry.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>entry_name</p></td>
<td class="parameter_description"><p>The name of the entry.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>color</p></td>
<td class="parameter_description"><p>The new entry's color color.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>entry_num</p></td>
<td class="parameter_description"><p>The index of the added entry. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-add-entry.returns"></a><h4>Returns</h4>
<p> TRUE on success.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-delete-entry"></a><h3>gimp_palette_delete_entry ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_palette_delete_entry (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
                           <em class="parameter"><code><span class="type">gint</span> entry_num</code></em>);</pre>
<p>Deletes a palette entry from the specified palette.</p>
<p>This procedure deletes an entry from the specified palette. It
returns an error if the entry palette does not exist.</p>
<div class="refsect3">
<a name="gimp-palette-delete-entry.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>entry_num</p></td>
<td class="parameter_description"><p>The index of the added entry.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-delete-entry.returns"></a><h4>Returns</h4>
<p> TRUE on success.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-entry-get-color"></a><h3>gimp_palette_entry_get_color ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_palette_entry_get_color (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
                              <em class="parameter"><code><span class="type">gint</span> entry_num</code></em>,
                              <em class="parameter"><code><a href="../html/libgimpcolor3-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>);</pre>
<p>Gets the specified palette entry from the specified palette.</p>
<p>This procedure retrieves the color of the zero-based entry specified
for the specified palette. It returns an error if the entry does not
exist.</p>
<div class="refsect3">
<a name="gimp-palette-entry-get-color.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>entry_num</p></td>
<td class="parameter_description"><p>The entry to retrieve.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>color</p></td>
<td class="parameter_description"><p>The color requested. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-entry-get-color.returns"></a><h4>Returns</h4>
<p> TRUE on success.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-entry-set-color"></a><h3>gimp_palette_entry_set_color ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_palette_entry_set_color (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
                              <em class="parameter"><code><span class="type">gint</span> entry_num</code></em>,
                              <em class="parameter"><code>const <a href="../html/libgimpcolor3-GimpRGB.html#GimpRGB"><span class="type">GimpRGB</span></a> *color</code></em>);</pre>
<p>Sets the specified palette entry in the specified palette.</p>
<p>This procedure sets the color of the zero-based entry specified for
the specified palette. It returns an error if the entry does not
exist.</p>
<div class="refsect3">
<a name="gimp-palette-entry-set-color.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>entry_num</p></td>
<td class="parameter_description"><p>The entry to retrieve.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>color</p></td>
<td class="parameter_description"><p>The new color.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-entry-set-color.returns"></a><h4>Returns</h4>
<p> TRUE on success.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-entry-get-name"></a><h3>gimp_palette_entry_get_name ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_palette_entry_get_name (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
                             <em class="parameter"><code><span class="type">gint</span> entry_num</code></em>,
                             <em class="parameter"><code><span class="type">gchar</span> **entry_name</code></em>);</pre>
<p>Gets the specified palette entry from the specified palette.</p>
<p>This procedure retrieves the name of the zero-based entry specified
for the specified palette. It returns an error if the entry does not
exist.</p>
<div class="refsect3">
<a name="gimp-palette-entry-get-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>entry_num</p></td>
<td class="parameter_description"><p>The entry to retrieve.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>entry_name</p></td>
<td class="parameter_description"><p>The name requested. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-entry-get-name.returns"></a><h4>Returns</h4>
<p> TRUE on success.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-entry-set-name"></a><h3>gimp_palette_entry_set_name ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_palette_entry_set_name (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
                             <em class="parameter"><code><span class="type">gint</span> entry_num</code></em>,
                             <em class="parameter"><code>const <span class="type">gchar</span> *entry_name</code></em>);</pre>
<p>Sets the specified palette entry in the specified palette.</p>
<p>This procedure sets the name of the zero-based entry specified for
the specified palette. It returns an error if the entry does not
exist.</p>
<div class="refsect3">
<a name="gimp-palette-entry-set-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>entry_num</p></td>
<td class="parameter_description"><p>The entry to retrieve.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>entry_name</p></td>
<td class="parameter_description"><p>The new name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-entry-set-name.returns"></a><h4>Returns</h4>
<p> TRUE on success.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-palette-is-editable"></a><h3>gimp_palette_is_editable ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_palette_is_editable (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
<p>Tests if palette can be edited</p>
<p>Returns TRUE if you have permission to change the palette</p>
<div class="refsect3">
<a name="gimp-palette-is-editable.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>The palette name.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-palette-is-editable.returns"></a><h4>Returns</h4>
<p> TRUE if the palette can be edited.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.0</div>
</body>
</html>